package com.zj.eswrapper.wrapper;

import com.zj.eswrapper.interfaces.field.IStringField;
import com.zj.eswrapper.interfaces.impl.AbstractEsSearchWrapper;
import org.elasticsearch.search.builder.SearchSourceBuilder;

/**
 * es7分页以及排序等条件拼接器
 *
 * @author 19242
 */
public class EsSearchWrapper<DO> extends AbstractEsLastSearchWrapper<String, EsSearchWrapper<DO>>
        implements IStringField<EsLambdaSearchWrapper<DO>> {

    public EsSearchWrapper(SearchSourceBuilder searchSourceBuilder) {
        super(searchSourceBuilder);
    }

    public EsSearchWrapper(AbstractEsSearchWrapper<?, ?, SearchSourceBuilder> searchWrapper) {
        super(searchWrapper);
    }

    @Override
    public EsLambdaSearchWrapper<DO> lambda() {
        return new EsLambdaSearchWrapper<>(this);
    }
}
